package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qijian.maindata.domain.ProjectAssemblyDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 开工令装配明细Mapper接口
 *
 * @author qijian
 * @date 2024-08-14
 */
public interface ProjectAssemblyDetailMapper extends BaseMapper<ProjectAssemblyDetail> {

    @Select("select count(0) from main_project_assembly_detail WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();


    @Update("update main_project_assembly_detail set is_del = 1 where main_id = #{mainId}")
    void deleteByMainId(@Param("mainId") Long id);
}
